package com.wxyzz.satserver.post.controller;

import com.wxyzz.common.core.common.R;
import com.wxyzz.satserver.post.param.AddPostParam;
import com.wxyzz.satserver.post.service.PostService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * --- 加油，努力 ---
 *
 * @Author XYP
 * @Date 2024/11/21
 * @Solgne 从想做到能做
 * @Desc
 */
@RestController
@CrossOrigin
@RequestMapping("/squqre")
@Api(tags ="广场模块api")
public class PostController {
    @Resource
    private PostService postService;

    @GetMapping("/addPost")
    @ApiOperation(value = "发布帖子")
    public R addPost(AddPostParam addPostParam) {
        System.out.println(addPostParam);
        postService.addPost(addPostParam);
        return R.ok();
    }
}
